package com.esri.core.io;

/* loaded from: classes.dex */
public class EsriSecurityException extends Exception implements EsriErrorCode {
    public static final int AUTHENTICATION_FAILED = -10001;
    public static final String HTTP_AUTHENTICATION_FAIL_MESSAGE = "Invalid or missing user credentials";
    public static final int MISSING_CLIENT_CERTIFICATE = -10006;
    public static final int NTLM_NULL_DOMAIN = -10005;
    public static final String TOKEN_AUTHENTICATION_FAIL_MESSAGE = "Unauthorized access to a secure service";
    public static final int TOKEN_INVALID = -10002;
    public static final int TOKEN_SERVICE_NOT_FOUND = -10003;
    public static final int UNTRUSTED_SERVER_CERTIFICATE = -10004;
    private static final long serialVersionUID = 1;
    int a;

    public EsriSecurityException(int i) {
        super(getMSG(i));
        this.a = -1;
        this.a = i;
    }

    public EsriSecurityException(Throwable th) {
        super(th);
        this.a = -1;
    }

    public EsriSecurityException(int i, String str, Throwable th) {
        super(str, th);
        this.a = -1;
        this.a = i;
    }

    public EsriSecurityException(int i, String str) {
        super(str);
        this.a = -1;
        this.a = i;
    }

    @Override // com.esri.core.io.EsriErrorCode
    public int getCode() {
        return this.a;
    }

    public static String getMSG(int i) {
        switch (i) {
            case MISSING_CLIENT_CERTIFICATE /* -10006 */:
                return "EsriSecurityException[code = " + i + " msg = Client certificate is required but has not been set in the trust store.";
            case NTLM_NULL_DOMAIN /* -10005 */:
                return "EsriSecurityException[code = " + i + " msg = NTLM authentication attempted with a null domain.";
            case UNTRUSTED_SERVER_CERTIFICATE /* -10004 */:
                return "EsriSecurityException[code = " + i + " msg = Untrusted server certificate.";
            case TOKEN_SERVICE_NOT_FOUND /* -10003 */:
                return "EsriSecurityException[code = " + i + " msg = Unable to find a token service to generate a security token. A valid token service URL must be specified.";
            case TOKEN_INVALID /* -10002 */:
                return "EsriSecurityException[code = " + i + " msg = User supplied a token that was invalid or the validity of the token has expired.";
            case -10001:
                return "EsriSecurityException[code = " + i + " msg = User credentials were invalid. Please supply a valid username and password in order to access the secure service.";
            default:
                return "EsriSecurityException[Undefined error";
        }
    }

    @Override // com.esri.core.io.EsriErrorCode
    public String getDescription() {
        return getMessage();
    }
}
